SmitearWebGL.Objects.Parser.Collada.DaeTransform = Class.extend(
{
	/******** constructor ********/

	init : function( type, sid, values )
	{
		this.type = type;
		this.sid = sid;
		this.values = values;
		this.animated = false;
		
		this._registClass( "SmitearWebGL.Objects.Parser.Collada.DaeTransform" );

		$THROW( this.validateValues(), "[ERROR] invalid values for this transform!" );
	}
	,
	validateValues : function()
	{
		var valid = false;

		if( !this.values || !this.values.length )
			return false;

		switch( this.type )
		{
			case SmitearWebGL.Objects.Parser.Collada.Const.DAE_ROTATE_ELEMENT:
				valid = (this.values.length == 4);
				break;
			case SmitearWebGL.Objects.Parser.Collada.Const.DAE_TRANSLATE_ELEMENT:
				valid = (this.values.length == 3);
				break;
			case SmitearWebGL.Objects.Parser.Collada.Const.DAE_SCALE_ELEMENT:
				valid = (this.values.length == 3);
				break;
			case SmitearWebGL.Objects.Parser.Collada.Const.DAE_MATRIX_ELEMENT:
				valid = (this.values.length == 16);
				break;
			default:
				break;
		}

		return valid;
	}
}
);